﻿<%@ Page Title="幻灯片管理" Language="C#" MasterPageFile="Function.Master" AutoEventWireup="true" CodeBehind="BannerList.aspx.cs" Inherits="LEARNREN.COM.WebSite.Admin.BannerList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="images/bannerlist.css" rel="stylesheet" type="text/css" />
    <script src="script/plupload/plupload.full.min.js" type="text/javascript"></script>
    <script src="script/plupload/zh_CN.js" type="text/javascript"></script>
    <script type="text/javascript">
        var edit_pannel;
        var group_edit_pannel;
        var group_list_pannel;
        var dataTableInPage;
        var groupTable;
        var uploader;
        var applicationPath = '<%=Request.ApplicationPath=="/"?"":Request.ApplicationPath %>';        
    </script>
    <script src="script/bannerlist.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style="margin-bottom: 5px;">
        <select id="slGroupNav" class="textEntry ui-widget-content ui-corner-all"  Style="padding: .3em;">
            <option value="-1">默认分组</option>
            <%using (LEARNREN.COM.BLL.BannerGroupLogic logic = new LEARNREN.COM.BLL.BannerGroupLogic())
              {
                  List<LEARNREN.COM.Entity.BannerGroup> groups = logic.GetListASC(p => p.Title);
                  foreach (var group in groups)
                  {                      
            %>
            <option value="<%=group.Id %>">
                <%=group.Title %></option>
            <%}
              }%>
        </select>
        <span style="width: 10px;"></span>
        <button id="addGroupBtn" value="添加分组">添加分组</button>
        <span style="width: 10px;"></span>
        <button id="manageGroupBtn" value="管理分组">管理分组</button>
        <span style="width: 10px;"></span>
        <button id="addBannerBtn" value="添加幻灯片">添加幻灯片</button>
    </div>
    <table id="dataTable" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>序号</th>
                <th>标题</th>
                <th>图片</th>
                <th>目标</th>
                <th>排序</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
    <div id="edit_pannel" title="修改幻灯片">
        <form action="Logout.aspx" method="post">
        <div>
            <label for="txt_title" style="display: block;">标题</label>
            <input id="txt_title" name="txt_title" type="text" />
        </div>
        <div>
            <label for="slGroup" style="display: block;">分组</label>
            <select id="slGroup" class="textEntry ui-widget-content ui-corner-all"  Style="padding: .3em;">
                <option value="-1">默认分组</option>
                <%using (LEARNREN.COM.BLL.BannerGroupLogic logic = new LEARNREN.COM.BLL.BannerGroupLogic())
                  {
                      List<LEARNREN.COM.Entity.BannerGroup> groups = logic.GetListASC(p => p.Title);
                      foreach (var group in groups)
                      {                      
                %>
                <option value="<%=group.Id %>">
                    <%=group.Title %></option>
                <%}
                  }%>
            </select>
        </div>
        <div style="height: 14px;">
        </div>
        <div id="imgp">
            <label for="btnSelectImg">图片</label>
            <span style="float: right;">
                <a id="btnSelectImg" href="#">选择</a>
                <a id="btnUpload" href="#">上传</a>
            </span>
            <div class="clear">
            </div>
            <ul id="file-list" class="ui-corner-all" style="height: 234px; text-align: center; margin: 12px auto; border: 1px solid #ccc;"></ul>
        </div>
        <div>
            <label for="txt_url" style="display: block;">目标</label>
            <input id="txt_url" name="txt_url" type="text" />
        </div>
        <div>
            <label for="txt_order" style="display: block;">排序</label>
            <input id="txt_order" name="txt_order" type="text" />
        </div>
        <input type="hidden" id="hid_id" name="hid_id" />
        <input type="hidden" id="hid_imgpath" name="hid_imgpath" />
        <input type="hidden" id="hid_operation" name="hid_operation" />
        <input type="submit" tabindex="-1" style="position: absolute; top: -1000px" />
        </form>
    </div>
    <div id="group_edit_pannel">
        <form action="Logout.aspx" method="post">
        <div>
            <label for="txt_groupTitle">分组名</label>
            <input id="txt_groupTitle" name="txt_groupTitle" type="text" />
        </div>
        <input type="hidden" id="hid_groupid" name="hid_groupid" />
        <input type="hidden" id="hid_group_operation" name="hid_group_operation" />
        <input type="submit" tabindex="-1" style="position: absolute; top: -1000px" />
        </form>
    </div>
    <div id="group_list_pannel">
        <table id="groupTable" class="display" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th>序号</th>
                    <th>标题</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
</asp:Content>
